#include<bits/stdc++.h>

using namespace std;

double f() {
    string t;//tok;
    cin >> t;
    istringstream iss(t);
    double x;
    if (iss >> x) {
        return x;
    } else {
        double a = f();
        double b = f();
        double c;
        switch (t[0]) {
            case '+':
                c = a + b;
                break;
            case '-':
                c = a - b;
                break;
            case '*':
                c = a * b;
                break;
            case '/':
                c = a / b;
                break;
            default:
                break;
        }
        return c;


    }
}

int main() {
    cout << fixed << setprecision(2) << f();

    return 0;
}
